<template>
	<view style="padding-bottom: 50rpx;">
		<page-head :title="'历史测评'" :headtype="2"></page-head>
		<view class="hislist">
			<view class="hisitem marginAuto flex" 
			v-for="(item,index) in datas" :key="index" 
			>
			<!-- @click="apifun.navigate('/pages/my/mydrivermaketesxq','id=1')" -->
				<view class="hisl">
					<view class="hisltitle">测评时间</view>
					<view class="hisltime">{{ item.create_time }}</view>
				</view>
				<view class="hisr">
					<text style="font-size:50rpx;">{{ item.score }}</text>
					<text style="font-size:26rpx;">小时</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				apifun:this.apifun,
				page:1,
				datas:[]
			};
		},
		onLoad() {
			this.initData();
		},
		methods: {
			initData(){
				this.apifun.unirequest('/api/partnerDrive/getUserExamineList','post',{},(res)=>{
					// console.log(res)
					if(res.code === 200){
						let datas = res.data;
						this.datas = datas;
					}else{
						this.apifun.toast(res.msg)
					}
				})
			}
		},
		onPullDownRefresh() {
			this.page = 1;
			this.datas = [];
			this.initData();
			uni.stopPullDownRefresh();
		},
		// onReachBottom() {
		// 	this.page++;
		// 	this.initData()
		// },
	};
</script>

<style scoped lang="scss">
	.hisitem{
		width: 650rpx;
		padding: 20rpx;
		background: #fff;
		border-radius: 20rpx;
		margin-top: 20rpx;
		justify-content: space-between;
		.hisl{
			line-height: 40rpx;
			.hisltitle{
				font-size: 26rpx;
				color:#222222;
			}
			.hisltime{
				padding-top: 20rpx;
				font-size: 26rpx;
				color:#666666;
			}
		}
		.hisr{
			line-height: 100rpx;
			color:#FC2A2A;
		}
	}
</style>